Class Comparer<T>

A default item comparer for an item type that is either generic (IComparable<T>) or ordinarily (System.IComparable) comparable.

Bases

object

Property overview

Default

Method overview

Equals(object obj), Inherited from object ,
Finalize(), Inherited from object ,
GetHashCode(), Inherited from object ,
GetType(), Inherited from object ,
MemberwiseClone(), Inherited from object ,
ToString(), Inherited from object

Property details

S System.Collections.Generic.IComparer<T> DefaultAccess: Read-Only

Value:The comparer

Create a default comparer.

The IComparer[T] object is constructed when this class is initialised, i.e. its static constructors called. Thus, the property will be the same object for the duration of an invocation of the runtime, but a value serialized in another invocation and deserialized here will not be the same object.

Throws
NotComparableExceptionIf T is not comparable